import Vue from 'vue'
import VueRouter from 'vue-router'
// 0.配置路由
Vue.use(VueRouter)
// 1.导入路由
import ArtCate from '@/views/Article/ArtCate.vue'
import ArtList from '@/views/Article/ArtList.vue'
import Home from '@/views/Home/Home.vue'
import Login from '@/views/User/Login.vue'
import Main from '@/views/User/Main.vue'
import Reqister from '@/views/User/Reqister.vue'
import UserAvatar from '@/views/User/UserAvatar.vue'
import UserInfo from '@/views/User/UserInfo.vue'
import UserPwd from '@/views/User/UserPwd.vue'
// 2.创建路由规则
const routes = [
  { path: "/", redirect: "/main" },
  { path: "/art-cate", component: ArtCate },
  { path: "/art-list", component: ArtList },
  { path: "/home", component: Home },
  { path: "/login", component: Login },
  { path: "/main", component: Main },
  { path: "/reqister", component: Reqister },
  { path: "/user-avatar", component: UserAvatar },
  { path: "/user-info", component: UserInfo },
  { path: "/user-pwd", component: UserPwd },
]
// 3.创建路由实例化router对象
const router = new VueRouter({
  routes
})
// 导出router路由对象
export default router
